package com.sixth.dao;

import com.sixth.entity.Branch;
import com.sixth.entity.BranchTransfer;
import com.sixth.entity.Shopkeeperchange;
import com.sixth.entity.Staff;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

public interface BranchDao {
    int deleteByPrimaryKey(Integer id);

    int insert(Branch record);

    int insertSelective(Branch record);

    Branch selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Branch record);

    int updateByPrimaryKey(Branch record);

    List<Branch> selectAllbranch();

    Branch selectBybranchid(Integer branchid);

    Branch selectByBranchidBranch(Integer branchid);

    List<Branch> getBranchName(String branchname);

    //按照branchid查询店铺
    Branch selectStaffidByBranchid(Integer branchid);

    //修改店长状态
    int updateBoos(Integer branchid);


    //添加员工时添加店长
    int UpdateBoss(@Param("staffid") Integer staffid,@Param("branchid") Integer branchid);

    List<Branch> getOneBranch(Integer branchid);

    List<Branch> selectEmpByCondition(String branchname);

    Integer updateBranch(Branch branch);

    Integer updateBranch1(Branch branch);

    Integer addBranch(Branch branch);

    Integer addShopkeeperChange(Shopkeeperchange sc);

    Integer insertBranchAndGoods(@Param("branchid") Integer var1, @Param("list") ArrayList<Integer> var2);

    Integer DZTransfer(BranchTransfer branchTransfer);

    void updateBranchStaff(BranchTransfer branchTransfer);

    Integer updateStaff(@Param("branchid") Integer var1, @Param("staffid") Integer var2);

    Integer updateBranchSt(@Param("branchid") Integer var1, @Param("staffid") Integer var2);

    int updateState(@Param("id") Integer var1, @Param("state") Integer var2);
}